<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
	</body>
	<script>
		class ColorShape {
			yellowCircle() {
				console.log('yellow circle')
			}
			redCircle() {
				console.log('red circle')
			}
			yellowTriangle() {
				console.log('yellow triangle')
			}
			redTriangle() {
				console.log('red triangle')
			}
		}

		//测试
		let cs = new ColorShape()
		cs.yellowCircle()
		cs.redCircle()
		cs.yellowTriangle()
		cs.redTriangle()
	</script>

</html>